home *** CD-ROM | disk | FTP | other *** search
- Subject: Re(2): Any tips for Building ODF with CW8 CFM68k?
- Sent: 3/25/96 1:59 PM
- Received: 3/25/96 1:11 PM
- From: Jim Lloyd, jim_lloyd@powertalk.apple.com
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- Actually, I had similar binding problems while trying to get our parts working
- with CFM68K and never successfully debugged the problem until getting the last
- release of CFM68K tools from Metrowerks, at which time the problems went away.
- At the suggestion of Stephen Coy <stevec@mpx.com.au>, I had also made one
- change that you may need to make. Apparently, there is a problem with
- Metrowerk's ability to import MPW .o files, and because of it there are
- problems with ODMathM.o (inside the ODUtils subsystem). This may or may not
- have been fixed in the most recent Metrowerks update, I haven't verified it
- yet. To workaround the problem, you would need to take the source code in
- ODMathM.a and move it into the inline assembler format recognized by the
- Metrowerks C/C++ compiler. I've pasted a sample at the end of this message.
-
- We are getting very close to finalizing ODF 1, and expect all of the problems
- with CFM68K to be fixed (assuming I focus my time on fixing them). For this
- reason, I am very reluctant to provide further technical support on CFM68K
- with ODF 1.0d11. If the information in this message doesn't allow you to get
- your parts working I'm afraid you'll have to wait till ODF 1 is released (in
- about 3 weeks).
-
- Jim Lloyd
- ODF Team
-
- ------ From: ODF-Interest@CILabs.ORG, Mon, Mar 25, 1996 ------
-
- Thanks to Jim, now I can successfully link ODFNothing and ODFDraw with CW8
- CFM68k.
- But, the resultant part won't produce stationary file when dropped on to
- OpenDoc App. Error message says "Unable to create the new Stationaly
- because the part editor could not be found. Please make sure it is
- installed correctly." I'm guessing that the fragment name set in "CFM68k"
- preferences panel of CWIDE is wrong.
-
- Can Jim or anybody suggest me the fragment name for ODFNothing? I've tried
- "ODFNothing" but no luck.
-
-
- ----- Following is some of ODMathM.a converted to MW inline assembler ----
-
-
- extern asm ODSLong ODWideDivide(const ODWide *dividend,
- ODSLong divisor, ODSLong *remainder)
- {
- machine 68020
- machine 68881
- link a6,#-2
- moveq #-1,d0
- cmp.l 16(a6),d0 // if (rem == (void *)-1)
- seq -1(a6) // set check
- bne.s @noCheck
- clr.l 16(a6) // rem = 0
- @noCheck:
- move.l 8(a6),a0 // get num
- move.l (a0)+,d1
- move.l (a0),d0
- move.l 12(a6),d2 // get denom
- beq.s @div0
- bpl.s @1
- neg.l d2
- @1: tst.l 16(a6) // check rem
- bne.s @3
- lsr.l #1,d2
- tst.l d1
- bpl.s @2
- neg.l d2
- @2: add.l d2,d0
- bfexts d2{0:1},d2
- addx.l d2,d1
- @3: divs.l 12(a6),d1:d0
- bvc.s @ok
- move.l 12(a6),d2
- @div0: tst.b -1(a6) // check check
- bne.s @div1
- eor.l d1,d2
- bmi.s @div1
- move.l #0x7FFFFFFF,d0
- bra.s @div2
- @div1: move.l #0x80000000,d0
- @div2: move.l #0x80000000,d1
- @ok: move.l 16(a6),d2 // get rem
- beq.s @done
- move.l d2,a0
- move.l d1,(a0)
- @done: unlk a6
- rtd #12
- }
-
- extern asm ODULong ODWideSquareRoot( const ODWide *src )
- {
- machine 68020
- machine 68881
- move.l (sp)+,a0
- move.l #0x80000000,d1
-
- // fmove.l d1,fp1
- opword 0xF201, 0x4080
-
- move.l (sp),a1 // Get src
- move.l (a1)+,d0 // Get hi long
- add.l d1,d0 // Offset for sign
-
- // fmove.l d0,fp0 // Move to FP0
- opword 0xF200, 0x4000
-
- // fsub.x fp1,fp0 // Compensate for offset
- opword 0xF200, 0x0428
-
- // fscale.w #32,fp0 // Shift by 32
- opword 0xF23C, 0x5026, 0x0020
-
- move.l (a1),d0 // Get lo long
- add.l d1,d0 // Offset for sign
-
- // fadd.l d0,fp0 // Add to FP0
- opword 0xF200, 0x4022
-
- // fsub.x fp1,fp0 // Compensate for offset
- opword 0xF200, 0x0428
-
- // fsqrt.x fp0 // The whole point
- opword 0xF200, 0x0004
-
- // fadd.x fp1,fp0 // Offset for sign
- opword 0xF200, 0x0422
-
- // fmove.l fp0,d0 // Pass result to D0
- opword 0xF200, 0x6000
-
- sub.l d1,d0 // Compensate for offset
- addq.l #4,sp
- jmp (a0)
- }
-
-
-